<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<script language="JavaScript">
<!--
function confirmDelete(){
    return confirm('确定删除该项目?');
  }
-->
</script>

<logic:notPresent name="userName" scope="session">
	<logic:redirect forward="login"></logic:redirect>
</logic:notPresent>

<logic:present name="info" scope="request">
	<font color="red"><bean:write name="info" scope="request" /> </font>
</logic:present>
<table border="1" bordercolor="#AAAAFF" cellspacing="0" cellpadding="0">
	<tr>
		<td align="center">
			<b>项目名称</b>
		</td>
		<td align="center">
			<b>项目要求</b>
		</td>
		<td align="center">
			<b>项目价格</b>
		</td>
		<td align="center">
			<b>启动时间</b>
		</td>
		<td align="center">
			<b>完成时间</b>
		</td>
		<td align="center">
			<b>项目状态</b>
		</td>
		<td align="center">
			<b>项目资源</b>
		</td>
		<td align="center">
			<b>项目积分</b>
		</td>
		<td align="center">
			<b>备注</b>
		</td>
		<td align="center" colspan="2">
			<b>管理</b>
		</td>
	</tr>
	<tr>
		<logic:iterate name="projectlist" id="row" indexId="rowNum"
			type="com.yhtl.struts.bean.ProjectBean" scope="request">
			<tr>
				<td align="center">
					<bean:write name="row" property="tblProjectName" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblProjectRequirement" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblProjectPrice" />
				</td>
				<td align="center">
					<bean:write name="row" property="strLaunchtime" />
				</td>
				<td align="center">
					<bean:write name="row" property="strDuetime" />
				</td>
				<td align="center">
					<logic:equal name="row" property="tblProjectStatus" value="0">项目申请</logic:equal>
					<logic:equal name="row" property="tblProjectStatus" value="1">申请结束</logic:equal>
					<logic:equal name="row" property="tblProjectStatus" value="2">项目结束</logic:equal>
				</td>
				<td align="center">
					<bean:write name="row" property="tblProjectResource" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblProjectPoint" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblProjectRemark" />
				</td>
				<td align="center">
					<html:link href="editProject.do" paramId="pid" paramName="row"
						paramProperty="tblProjectId">修改</html:link>
				</td>
				<td>
					<html:link href="delProject.do" paramId="pid" paramName="row"
						paramProperty="tblProjectId" onclick="return confirmDelete();">删除</html:link>
				</td>
			</tr>
		</logic:iterate>
	</tr>
</table>
第
<bean:write name="page" property="currentPage" />
页 共
<bean:write name="page" property="totalPages" />
页
<html:link action="/viewProject.do?pageMethod=first" paramName="page"
	paramProperty="currentPage" paramId="currentPage">首页</html:link>
<html:link action="/viewProject.do?pageMethod=previous" paramName="page"
	paramProperty="currentPage" paramId="currentPage">上一页</html:link>
<html:link action="/viewProject.do?pageMethod=next" paramName="page"
	paramProperty="currentPage" paramId="currentPage">下一页</html:link>

<html:link action="/viewProject.do?pageMethod=last" paramName="page"
	paramProperty="currentPage" paramId="currentPage">尾页</html:link>
